<?php

abstract class SiteMode extends Data {
    protected $siteId;
    protected function __construct(){
        parent::__construct();
        if(empty($this->siteId)){
            $this->siteId=isset($_COOKIE['site_id'])? (int)$_COOKIE['site_id']: 1;
            $this->siteId=empty($this->siteId)? 1: $this->siteId;
        }
//        setcookie("site_id", $this->siteId, time()+3600000, "/");
    }

    protected function setCookie($site_id){
        setcookie("site_id",$site_id,time()+3600000,"/");
    }
}